package threading;

public class ThreadDemo15 {
    public static void main(String[] args) throws InterruptedException {
        Object object = new Object();
        System.out.println("wait 之前");
        synchronized(object){//加锁的锁对象必须和调用wait的对象是同一个。
            object.wait();
        }

        System.out.println("wait 之后");
    }
}
